package com.ruoyi.charge.controller;

import com.ruoyi.charge.bo.PriceAddBo;
import com.ruoyi.charge.bo.PriceEditBo;
import com.ruoyi.charge.bo.PriceQueryBo;
import com.ruoyi.charge.service.IPriceService;
import com.ruoyi.charge.vo.PriceVo;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import java.util.Arrays;
import java.util.List;

/**
 * 充电价格Controller
 * 
 * @author fanqie
 * @date 2021-12-02
 */
@Api(value = "充电价格控制器", tags = {"充电价格管理"})
@RequiredArgsConstructor(onConstructor_ = @Autowired)
@RestController
@RequestMapping("/charge/price")
public class PriceController extends BaseController {

    private final IPriceService iPriceService;

    /**
     * 查询充电价格列表
     */
    @ApiOperation("查询充电价格列表")
    @GetMapping("/list")
    public TableDataInfo<PriceVo> list(PriceQueryBo bo) {
        startPage();
        List<PriceVo> list = iPriceService.queryList(bo);
        return getDataTable(list);
    }
}
